package com.acme.bankapp.domain.bank.client.email;

import com.acme.bankapp.domain.bank.client.Client;
import com.acme.bankapp.domain.bank.client.ClientRegistrationListener;
import com.acme.bankapp.service.email.EmailService;

@SuppressWarnings("serial")
public class EmailNotificationListener implements ClientRegistrationListener {
	@Override
	public void onClientAdded(Client c) {
		Email email = new Email(c, "test@db.com");
		EmailService.getEmailService().sendNotificationEmail(email);
		System.out.println("Notification email for client " + c + " to be sent");
	}
}
